package win;

import javafx.application.Application;
import javafx.scene.Scene;
import javafx.scene.web.WebView;
import javafx.stage.Stage;

public class aa extends Application {
    public static void main(String[] args) {
        launch(args);
    }

    @Override
    public void start(Stage primaryStage) {
        WebView webView = new WebView();
        try {
            // 加载本地HTML文件
            webView.getEngine().load(getClass().getResource("/webapp/a.html").toExternalForm());
        } catch (Exception e) {
            e.printStackTrace();
        }

        Scene scene = new Scene(webView, 800, 600);
        primaryStage.setScene(scene);
        primaryStage.setTitle("显示本地HTML文件");
        primaryStage.show();
    }
}
